<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>

        * {
            margin: 0;
            padding: 0;
            font-family: 'Poppins', sans-serif;
        }

        body {
            background: #0a2a43;
            min-height: 1500px;
        }

        section {
            position: relative;
            width: 100%;
            height: 100vh;
            overflow: hidden;
            display: flex;
            justify-content: center;
            align-items: center;
        }

        section img {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            object-fit: cover;
            pointer-events: none;
        }

        section:before {
            content: '';
            position: absolute;
            bottom: 0;
            width: 100%;
            height: 500px;
            background: linear-gradient(to top, #0a2a43, transparent);
            z-index: 10000;
        }

        section:after {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: #0a2a43;
            z-index: 10000;
            mix-blend-mode: color;
        }

        #text {
            position: relative;
            color: #fff;
            font-size: 10em;
            z-index: 1;
        }

        #moon {
            z-index: 2;
            width: 250px;
            height: 250px;
        }

    </style>
</head>
<body>
    <section>
        <img src="./img/bg.jpg" id="bg" />
        <img src="./img/moon.png" id="moon"/>
        <img src="./img/road.jpg" id="road" />
        <h1 id="text">Moon Light</h1>
    </section>
<script>
    let bg = document.getElementById("bg");
    let moon = document.getElementById("moon");
    let road = document.getElementById("road");
    let text = document.getElementById("text");

    window.addEventListener('scroll', function () {
        var value = window.scrollY;
        moon.style.top = value * 0.7 + 'px';
        moon.style.left = value * 1.5 + 'px';
    })

</script>
</body>
</html>